package com.ruoyi.business.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Sensitive;
import com.ruoyi.common.enums.DesensitizedType;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 人员台账对象 bus_person
 * 
 * @author ling
 * @date 2024-07-10
 */
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Data
public class BusPerson extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 删除标识 */
    private String delFlag;

    /** 创建者ID */
    private Long createUser;

    /** 更新者ID */
    private Long updateUser;

    /** 用户姓名 */
    @Excel(name = "用户姓名")
    private String personName;

    /** 用户性别 */
    @Excel(name = "用户性别" , readConverterExp = "0=男,1=女")
    private String personSex;

    /** 身份证号 */
    @Sensitive(desensitizedType = DesensitizedType.ID_CARD)
    @Excel(name = "身份证号")
    private String personNumber;

    /** 联系电话 */
    @Excel(name = "联系电话")
    @Sensitive(desensitizedType = DesensitizedType.PHONE)
    private String personPhone;

    /** 用户住址 */
    @Excel(name = "用户住址")
    private String personAddress;

    /** 用户学历 */
    private String personEducation;

    /** 合同类型 */
    private String contractType;

    /** 入场时间 */
    private Date einlassTime;

    /** 上岗证编号 */
    @Excel(name = "上岗证编号")
    private String certificateId;

    /** 班组ID */
    @Excel(name = "班组ID")
    private Long teamId;

    /** 岗位ID */
    @Excel(name = "岗位ID")
    private Long postId;

    /** 取证时间 */
    private Date evidenceTime;

    /** 上岗证照片 */
    private String workPhoto;

    /** 四至 */
    @Excel(name = "四至")
    private String border;

    /** 巡视计划 */
    @Excel(name = "巡视计划")
    private String inspectionPlan;

    /** 用户密码 */
    private String personPwd;


    /** 用户数量*/
    private Integer peopleNum;

    public BusPerson(Long teamId, Integer peopleNum) {
        this.teamId = teamId;
        this.peopleNum = peopleNum;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("delFlag", getDelFlag())
            .append("createUser", getCreateUser())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("personName", getPersonName())
            .append("personSex", getPersonSex())
            .append("personNumber", getPersonNumber())
            .append("personPhone", getPersonPhone())
            .append("personAddress", getPersonAddress())
            .append("personEducation", getPersonEducation())
            .append("contractType", getContractType())
            .append("einlassTime", getEinlassTime())
            .append("certificateId", getCertificateId())
            .append("teamId", getTeamId())
            .append("postId", getPostId())
            .append("evidenceTime", getEvidenceTime())
            .append("workPhoto", getWorkPhoto())
            .append("border", getBorder())
            .append("remark", getRemark())
            .append("inspectionPlan", getInspectionPlan())
            .append("personPwd", getPersonPwd())
            .toString();
    }
}
